package miao.demo.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface AccountDao{
    @Update("UPDATE tbl_account SET money = money + #{money} WHERE name = #{name}")
    void inMoney(@Param("name") String name, @Param("money") Double money);

    @Update("UPDATE tbl_account SET money = money - #{money} WHERE name = #{name}")
    void outMoney(@Param("name") String name,@Param("money") Double money);
}
